<?php echo $this->Html->addCrumb('Request Quote', '/request-quote');

//css
echo $this->Html->css(array('tws-framework', 'jquery-ui-1.8.15.custom','jquery.cluetip'), false);
 //plugins
 echo $this->Html->script(array('plugins/jquery.validate.min','plugins/additional-methods','plugins/custom-validation-methods','plugins/jquery.maskedinput-1.3','plugins/jquery.timeentry.min','plugins/jquery-ui-1.8.15.custom.min','plugins/jquery.cluetip','plugins/jquery.hoverIntent.min','plugins/jquery.form','plugins/jquery.blockUI'), false);
 //custom plugins
 echo $this->Html->script(array('mylibs/tws_console','mylibs/tws_form','mylibs/tws_overlay'), false);

?>

<?php
$this->Html->scriptStart(array('inline' => false));
echo '
      $(function(){
        $("#QuoteIndexForm").TWS_Form( {
          validate : {
          rules : {
            QuoteName : {required : true},
            QuoteEmailAddress: {email : true},
            QuotePhone: {phoneUS : true},
            QuoteEventDate: {date : true, required : true},
            QuoteAmtTocater: {required : true},
            QuoteCaptchaText: {required : true}
          }
          }});
        $("#QuoteCaptchaReload").click(function() {
          $("#QuoteCaptchaImg").attr("src", "'.$this->Html->url(array("action"=>"securimage")).'/" + Math.random());
          return false;
        }).show();

        });
       ';
$this->Html->scriptEnd();
?>


<div class="row">
  <div class="span4">
    <div class="row">
      <h2>Request a Quote</h2>
      <?php
         if(isset( $requestQuote['Content']['info'])) {
           echo nl2br($requestQuote['Content']['info']);
         }
      ?>
    </div>
    <div class="row">
      <ul class="thumbnails">
        <li class="span1">
          <?php echo $this->Html->image('food/service3.jpg', array('alt' => 'Food', 'title' => 'Food')) ?>
        </li>
        <li class="span2">
          <?php echo $this->Html->image('food/service2.jpg', array('alt' => 'Food', 'title' => 'Food')) ?>
        </li>
      </ul>
      <ul class="thumbnails">
        <li class="span4">
          <?php echo $this->Html->image('food/service1.jpg', array('alt' => 'Food', 'title' => 'Food')) ?>
        </li>
      </ul>
    </div>
  </div>
  <div class="span4">
    <h3>How may we serve you?</h3>
    <p>Provide information below to assist us in providing a quote.</p>

    <?php echo $this->Session->flash();?>
    <?php echo $this->Session->flash('email');
      if(!empty($email)){
        echo ($email['message']);
      }
    ?>

    <?php echo $this->element('errors', array('errors' => isset($errors)? $errors : null)); ?>

    <?php /*
       if(isset( $contents['Content']['info'])) {
         echo nl2br($contents['Content']['info']);
       }*/
    ?>


<div id="quoteFormContainer" >

<?php
echo $this->TWSForm->create('Quote',  array(
    'inputDefaults' => array(
        'div' => array('class'=>'row_')),
        'class'=>'inlineForm',
        'type'=>'file'));
echo $this->TWSForm->input('name', array('name'=>'QuoteName', 'type'=>'text', 'label'=>'<span class="required">*</span>Name'));
echo $this->TWSForm->input('phone', array('name'=>'QuotePhone', 'type'=>'tel'));
echo $this->TWSForm->input('email_address', array('name'=>'QuoteEmailAddress', 'type'=>'text'));
echo $this->TWSForm->input('event_date', array('name'=>'QuoteEventDate', 'type'=>'text', 'rel'=>'date', 'label'=>'<span class="required">*</span>Event Date'));
echo $this->TWSForm->input('amt_tocater', array('name'=>'QuoteAmtTocater', 'type'=>'text', 'label'=>'<span class="required">*</span>Amount to cater for'));
echo $this->TWSForm->input('menu_type', array('name'=>'QuoteMenuType', 'type'=>'select', 'options'=>$menuTypes));
echo $this->TWSForm->input('comments', array('name'=>'QuoteComments', 'type'=>'textarea', 'rows'=>'6', 'label'=>'Additional Comments or Details'));
?>
<div style="clear:both;"></div>

<div id="captcha_container">
    <img id="QuoteCaptchaImg" src="<?php echo $this->Html->url(array("action"=>"securimage")); ?>/0" alt="CAPTCHA image" />
    <div><p><a href="#" id="QuoteCaptchaReload">Reload Image</a></p></div>
    <p>Type the characters exactly as you see them in the image above. This ensures that a person, not an automated program, is submitting this form.</p>
    <?php echo $this->TWSForm->input('captcha_text', array('name'=>'QuoteCaptchaText', 'type'=>'text', 'label'=>'<span class="required">*</span>Image characters'));?>

</div>

  <div style="clear:both;"></div>
<?php
echo $this->TWSForm->end( array("label"=>"Submit", "class"=>"btn btn-warning", 'id'=>'submitBtn'));
?>
</div>

  </div>

  <ul class="thumbnails">
    <li class="span4">
      <?php echo $this->Html->image('food/food13.jpg', array('alt' => 'Food', 'title' => 'Food')) ?>
    </li>
    <li class="span4">
      <?php echo $this->Html->image('food/food14.jpg', array('alt' => 'Food', 'title' => 'Food')) ?>
    </li>
  </ul>
</div>